package com.itdct.onflow

import com.itdct.onflow.core.annotation.EnableTableScan
import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
import org.springframework.scheduling.annotation.EnableScheduling
import org.springframework.transaction.annotation.EnableTransactionManagement

/**
 * @author Zhouwx
 * @date 2025/10/11 10:00:54
 * @version 1.0
 * @description
 */
@EnableScheduling
@EnableTransactionManagement
@SpringBootApplication(scanBasePackages = ["com.itdct.onflow"])
@EnableTableScan(basePackages = ["com.itdct.onflow"])
@EnableDiscoveryClient
class OnflowCloudBoot

fun main(args: Array<String>) {
    val logger = LoggerFactory.getLogger("OnflowCloudBoot")
    logger.info("Onflow项目Cloud模式开始启动")

    runApplication<OnflowCloudBoot>(*args)

    Runtime.getRuntime().addShutdownHook(Thread {
        logger.warn("Onflow项目Cloud模式即将关闭")
    })
}